put_hevc_pel_bi_pixels4_8_c: 54.7 put_hevc_pel_bi_pixels4_8_neon: 43.0 put_hevc_pel_bi_pixels6_8_c: 94.7 put_hevc_pel_bi_pixels6_8_neon: 37.0 put_hevc_pel_bi_pixels8_8_c: 171.0 put_hevc_pel_bi_pixels8_8_neon: 24.0 put_hevc_pel_bi_pixels12_8_c: 354.0 put_hevc_pel_bi_pixels12_8_neon: 68.7 put_hevc_pel_bi_pixels16_8_c: 588.2 put_hevc_pel_bi_pixels16_8_neon: 77.5 put_hevc_pel_bi_pixels24_8_c: 1670.7 put_hevc_pel_bi_pixels24_8_neon: 173.0 put_hevc_pel_bi_pixels32_8_c: 2267.7 put_hevc_pel_bi_pixels32_8_neon: 281.2 put_hevc_pel_bi_pixels48_8_c: 5787.5 put_hevc_pel_bi_pixels48_8_neon: 673.5 put_hevc_pel_bi_pixels64_8_c: 9897.0 put_hevc_pel_bi_pixels64_8_neon: 1159.5
Showing the changes to libavcodec (2 of 2 files). Show all
Unified · Split
| @@ -244,6 +244,185 @@ function ff_hevc_put_hevc_pel_pixels64_8_neon, export=1 · 243 unmodified lines | |||
| 244 | endfunc | 244 | endfunc |
| 245 | 245 | ||
| 246 | 246 | ||
| 247 | function ff_hevc_put_hevc_pel_bi_pixels4_8_neon, export=1 | ||
| 248 | mov x10, #(MAX_PB_SIZE * 2) | ||
| 249 | 1: ld1 {v0.s}[0], [x2], x3 // src | ||
| 250 | ushll v16.8h, v0.8b, #6 | ||
| 251 | ld1 {v20.4h}, [x4], x10 // src2 | ||
| 252 | sqadd v16.8h, v16.8h, v20.8h | ||
| 253 | sqrshrun v0.8b, v16.8h, #7 | ||
| 254 | st1 {v0.s}[0], [x0], x1 | ||
| 255 | subs w5, w5, #1 | ||
| 256 | b.ne 1b | ||
| 257 | ret | ||
| 258 | endfunc | ||
| 259 | |||
| 260 | function ff_hevc_put_hevc_pel_bi_pixels6_8_neon, export=1 | ||
| 261 | mov x10, #(MAX_PB_SIZE * 2) | ||
| 262 | sub x1, x1, #4 | ||
| 263 | 1: ld1 {v0.8b}, [x2], x3 | ||
| 264 | ushll v16.8h, v0.8b, #6 | ||
| 265 | ld1 {v20.8h}, [x4], x10 | ||
| 266 | sqadd v16.8h, v16.8h, v20.8h | ||
| 267 | sqrshrun v0.8b, v16.8h, #7 | ||
| 268 | st1 {v0.s}[0], [x0], #4 | ||
| 269 | st1 {v0.h}[2], [x0], x1 | ||
| 270 | subs w5, w5, #1 | ||
| 271 | b.ne 1b | ||
| 272 | ret | ||
| 273 | endfunc | ||
| 274 | |||
| 275 | function ff_hevc_put_hevc_pel_bi_pixels8_8_neon, export=1 | ||
| 276 | mov x10, #(MAX_PB_SIZE * 2) | ||
| 277 | 1: ld1 {v0.8b}, [x2], x3 // src | ||
| 278 | ushll v16.8h, v0.8b, #6 | ||
| 279 | ld1 {v20.8h}, [x4], x10 // src2 | ||
| 280 | sqadd v16.8h, v16.8h, v20.8h | ||
| 281 | sqrshrun v0.8b, v16.8h, #7 | ||
| 282 | subs w5, w5, #1 | ||
| 283 | st1 {v0.8b}, [x0], x1 | ||
| 284 | b.ne 1b | ||
| 285 | ret | ||
| 286 | endfunc | ||
| 287 | |||
| 288 | function ff_hevc_put_hevc_pel_bi_pixels12_8_neon, export=1 | ||
| 289 | mov x10, #(MAX_PB_SIZE * 2) | ||
| 290 | sub x1, x1, #8 | ||
| 291 | 1: ld1 {v0.16b}, [x2], x3 | ||
| 292 | ushll v16.8h, v0.8b, #6 | ||
| 293 | ushll2 v17.8h, v0.16b, #6 | ||
| 294 | ld1 {v20.8h, v21.8h}, [x4], x10 | ||
| 295 | sqadd v16.8h, v16.8h, v20.8h | ||
| 296 | sqadd v17.8h, v17.8h, v21.8h | ||
| 297 | sqrshrun v0.8b, v16.8h, #7 | ||
| 298 | sqrshrun2 v0.16b, v17.8h, #7 | ||
| 299 | st1 {v0.8b}, [x0], #8 | ||
| 300 | subs w5, w5, #1 | ||
| 301 | st1 {v0.s}[2], [x0], x1 | ||
| 302 | b.ne 1b | ||
| 303 | ret | ||
| 304 | endfunc | ||
| 305 | |||
| 306 | function ff_hevc_put_hevc_pel_bi_pixels16_8_neon, export=1 | ||
| 307 | mov x10, #(MAX_PB_SIZE * 2) | ||
| 308 | 1: ld1 {v0.16b}, [x2], x3 // src | ||
| 309 | ushll v16.8h, v0.8b, #6 | ||
| 310 | ushll2 v17.8h, v0.16b, #6 | ||
| 311 | ld1 {v20.8h, v21.8h}, [x4], x10 // src2 | ||
| 312 | sqadd v16.8h, v16.8h, v20.8h | ||
| 313 | sqadd v17.8h, v17.8h, v21.8h | ||
| 314 | sqrshrun v0.8b, v16.8h, #7 | ||
| 315 | sqrshrun2 v0.16b, v17.8h, #7 | ||
| 316 | subs w5, w5, #1 | ||
| 317 | st1 {v0.16b}, [x0], x1 | ||
| 318 | b.ne 1b | ||
| 319 | ret | ||
| 320 | endfunc | ||
| 321 | |||
| 322 | function ff_hevc_put_hevc_pel_bi_pixels24_8_neon, export=1 | ||
| 323 | mov x10, #(MAX_PB_SIZE * 2) | ||
| 324 | 1: ld1 {v0.8b-v2.8b}, [x2], x3 // src | ||
| 325 | ushll v16.8h, v0.8b, #6 | ||
| 326 | ushll v17.8h, v1.8b, #6 | ||
| 327 | ushll v18.8h, v2.8b, #6 | ||
| 328 | ld1 {v20.8h-v22.8h}, [x4], x10 // src2 | ||
| 329 | sqadd v16.8h, v16.8h, v20.8h | ||
| 330 | sqadd v17.8h, v17.8h, v21.8h | ||
| 331 | sqadd v18.8h, v18.8h, v22.8h | ||
| 332 | sqrshrun v0.8b, v16.8h, #7 | ||
| 333 | sqrshrun v1.8b, v17.8h, #7 | ||
| 334 | sqrshrun v2.8b, v18.8h, #7 | ||
| 335 | subs w5, w5, #1 | ||
| 336 | st1 {v0.8b-v2.8b}, [x0], x1 | ||
| 337 | b.ne 1b | ||
| 338 | ret | ||
| 339 | endfunc | ||
| 340 | |||
| 341 | function ff_hevc_put_hevc_pel_bi_pixels32_8_neon, export=1 | ||
| 342 | mov x10, #(MAX_PB_SIZE * 2) | ||
| 343 | 1: ld1 {v0.16b-v1.16b}, [x2], x3 // src | ||
| 344 | ushll v16.8h, v0.8b, #6 | ||
| 345 | ushll2 v17.8h, v0.16b, #6 | ||
| 346 | ushll v18.8h, v1.8b, #6 | ||
| 347 | ushll2 v19.8h, v1.16b, #6 | ||
| 348 | ld1 {v20.8h-v23.8h}, [x4], x10 // src2 | ||
| 349 | sqadd v16.8h, v16.8h, v20.8h | ||
| 350 | sqadd v17.8h, v17.8h, v21.8h | ||
| 351 | sqadd v18.8h, v18.8h, v22.8h | ||
| 352 | sqadd v19.8h, v19.8h, v23.8h | ||
| 353 | sqrshrun v0.8b, v16.8h, #7 | ||
| 354 | sqrshrun2 v0.16b, v17.8h, #7 | ||
| 355 | sqrshrun v1.8b, v18.8h, #7 | ||
| 356 | sqrshrun2 v1.16b, v19.8h, #7 | ||
| 357 | st1 {v0.16b-v1.16b}, [x0], x1 | ||
| 358 | subs w5, w5, #1 | ||
| 359 | b.ne 1b | ||
| 360 | ret | ||
| 361 | endfunc | ||
| 362 | |||
| 363 | function ff_hevc_put_hevc_pel_bi_pixels48_8_neon, export=1 | ||
| 364 | mov x10, #(MAX_PB_SIZE) | ||
| 365 | 1: ld1 {v0.16b-v2.16b}, [x2], x3 // src | ||
| 366 | ushll v16.8h, v0.8b, #6 | ||
| 367 | ushll2 v17.8h, v0.16b, #6 | ||
| 368 | ushll v18.8h, v1.8b, #6 | ||
| 369 | ushll2 v19.8h, v1.16b, #6 | ||
| 370 | ushll v20.8h, v2.8b, #6 | ||
| 371 | ushll2 v21.8h, v2.16b, #6 | ||
| 372 | ld1 {v24.8h-v27.8h}, [x4], #(MAX_PB_SIZE) // src2 | ||
| 373 | sqadd v16.8h, v16.8h, v24.8h | ||
| 374 | sqadd v17.8h, v17.8h, v25.8h | ||
| 375 | sqadd v18.8h, v18.8h, v26.8h | ||
| 376 | sqadd v19.8h, v19.8h, v27.8h | ||
| 377 | ld1 {v24.8h-v25.8h}, [x4], x10 | ||
| 378 | sqadd v20.8h, v20.8h, v24.8h | ||
| 379 | sqadd v21.8h, v21.8h, v25.8h | ||
| 380 | sqrshrun v0.8b, v16.8h, #7 | ||
| 381 | sqrshrun2 v0.16b, v17.8h, #7 | ||
| 382 | sqrshrun v1.8b, v18.8h, #7 | ||
| 383 | sqrshrun2 v1.16b, v19.8h, #7 | ||
| 384 | sqrshrun v2.8b, v20.8h, #7 | ||
| 385 | sqrshrun2 v2.16b, v21.8h, #7 | ||
| 386 | subs w5, w5, #1 | ||
| 387 | st1 {v0.16b-v2.16b}, [x0], x1 | ||
| 388 | b.ne 1b | ||
| 389 | ret | ||
| 390 | endfunc | ||
| 391 | |||
| 392 | function ff_hevc_put_hevc_pel_bi_pixels64_8_neon, export=1 | ||
| 393 | 1: ld1 {v0.16b, v1.16b, v2.16b, v3.16b}, [x2], x3 // src | ||
| 394 | ushll v16.8h, v0.8b, #6 | ||
| 395 | ushll2 v17.8h, v0.16b, #6 | ||
| 396 | ushll v18.8h, v1.8b, #6 | ||
| 397 | ushll2 v19.8h, v1.16b, #6 | ||
| 398 | ushll v20.8h, v2.8b, #6 | ||
| 399 | ushll2 v21.8h, v2.16b, #6 | ||
| 400 | ushll v22.8h, v3.8b, #6 | ||
| 401 | ushll2 v23.8h, v3.16b, #6 | ||
| 402 | ld1 {v24.8h, v25.8h, v26.8h, v27.8h}, [x4], #(MAX_PB_SIZE) // src2 | ||
| 403 | sqadd v16.8h, v16.8h, v24.8h | ||
| 404 | sqadd v17.8h, v17.8h, v25.8h | ||
| 405 | sqadd v18.8h, v18.8h, v26.8h | ||
| 406 | sqadd v19.8h, v19.8h, v27.8h | ||
| 407 | ld1 {v24.8h, v25.8h, v26.8h, v27.8h}, [x4], #(MAX_PB_SIZE) | ||
| 408 | sqadd v20.8h, v20.8h, v24.8h | ||
| 409 | sqadd v21.8h, v21.8h, v25.8h | ||
| 410 | sqadd v22.8h, v22.8h, v26.8h | ||
| 411 | sqadd v23.8h, v23.8h, v27.8h | ||
| 412 | sqrshrun v0.8b, v16.8h, #7 | ||
| 413 | sqrshrun2 v0.16b, v17.8h, #7 | ||
| 414 | sqrshrun v1.8b, v18.8h, #7 | ||
| 415 | sqrshrun2 v1.16b, v19.8h, #7 | ||
| 416 | sqrshrun v2.8b, v20.8h, #7 | ||
| 417 | sqrshrun2 v2.16b, v21.8h, #7 | ||
| 418 | sqrshrun v3.8b, v22.8h, #7 | ||
| 419 | sqrshrun2 v3.16b, v23.8h, #7 | ||
| 420 | st1 {v0.16b, v1.16b, v2.16b, v3.16b}, [x0], x1 | ||
| 421 | subs w5, w5, #1 | ||
| 422 | b.ne 1b | ||
| 423 | ret | ||
| 424 | endfunc | ||
| 425 | |||
| 247 | function ff_hevc_put_hevc_epel_v4_8_neon, export=1 | 426 | function ff_hevc_put_hevc_epel_v4_8_neon, export=1 |
| 248 | load_epel_filterb x5, x4 | 427 | load_epel_filterb x5, x4 |
| 249 | sub x1, x1, x2 | 428 | sub x1, x1, x2 |
| @@ -156,6 +156,10 @@ NEON8_FNPROTO(pel_pixels, (int16_t *dst, · 155 unmodified lines | |||
| 156 | const uint8_t *src, ptrdiff_t srcstride, | 156 | const uint8_t *src, ptrdiff_t srcstride, |
| 157 | int height, intptr_t mx, intptr_t my, int width),); | 157 | int height, intptr_t mx, intptr_t my, int width),); |
| 158 | 158 | ||
| 159 | NEON8_FNPROTO(pel_bi_pixels, (uint8_t *dst, ptrdiff_t dststride, | ||
| 160 | const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, | ||
| 161 | int height, intptr_t mx, intptr_t my, int width),); | ||
| 162 | |||
| 159 | NEON8_FNPROTO(epel_v, (int16_t *dst, | 163 | NEON8_FNPROTO(epel_v, (int16_t *dst, |
| 160 | const uint8_t *src, ptrdiff_t srcstride, | 164 | const uint8_t *src, ptrdiff_t srcstride, |
| 161 | int height, intptr_t mx, intptr_t my, int width),); | 165 | int height, intptr_t mx, intptr_t my, int width),); |
| @@ -324,6 +328,8 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) · 162 unmodified lines | |||
| 324 | NEON8_FNASSIGN(c->put_hevc_epel, 1, 0, epel_v,); | 328 | NEON8_FNASSIGN(c->put_hevc_epel, 1, 0, epel_v,); |
| 325 | NEON8_FNASSIGN(c->put_hevc_qpel, 0, 0, pel_pixels,); | 329 | NEON8_FNASSIGN(c->put_hevc_qpel, 0, 0, pel_pixels,); |
| 326 | NEON8_FNASSIGN(c->put_hevc_qpel, 1, 0, qpel_v,); | 330 | NEON8_FNASSIGN(c->put_hevc_qpel, 1, 0, qpel_v,); |
| 331 | NEON8_FNASSIGN(c->put_hevc_epel_bi, 0, 0, pel_bi_pixels,); | ||
| 332 | NEON8_FNASSIGN(c->put_hevc_qpel_bi, 0, 0, pel_bi_pixels,); | ||
| 327 | NEON8_FNASSIGN(c->put_hevc_epel_uni, 0, 0, pel_uni_pixels,); | 333 | NEON8_FNASSIGN(c->put_hevc_epel_uni, 0, 0, pel_uni_pixels,); |
| 328 | NEON8_FNASSIGN(c->put_hevc_epel_uni, 1, 0, epel_uni_v,); | 334 | NEON8_FNASSIGN(c->put_hevc_epel_uni, 1, 0, epel_uni_v,); |
| 329 | NEON8_FNASSIGN(c->put_hevc_qpel_uni, 0, 0, pel_uni_pixels,); | 335 | NEON8_FNASSIGN(c->put_hevc_qpel_uni, 0, 0, pel_uni_pixels,); |