History

aarch64/vvc: Add put_qpel_h_* and put_qpel_uni_h_*

Just share hevc implementation. checkasm --test=vvc_mc --benchmark: put_luma_h_8_4x4_c: 0.2 ( 1.00x) put_luma_h_8_4x4_neon: 0.2 ( 1.00x) put_luma_h_8_8x8_c: 1.0 ( 1.00x) put_luma_h_8_8x8_neon: 0.2 ( 4.33x) put_luma_h_8_16x16_c: 3.2 ( 1.00x) put_luma_h_8_16x16_neon: 1.2 ( 2.63x) put_luma_h_8_32x32_c: 13.7 ( 1.00x) put_luma_h_8_32x32_neon: 4.0 ( 3.45x) put_luma_h_8_64x64_c: 48.2 ( 1.00x) put_luma_h_8_64x64_neon: 15.7 ( 3.07x) put_luma_h_8_128x128_c: 203.5 ( 1.00x) put_luma_h_8_128x128_neon: 62.0 ( 3.28x) put_uni_h_luma_8_4x4_c: 0.2 ( 1.00x) put_uni_h_luma_8_4x4_neon: 0.2 ( 1.00x) put_uni_h_luma_8_8x8_c: 1.5 ( 1.00x) put_uni_h_luma_8_8x8_neon: 0.2 ( 6.56x) put_uni_h_luma_8_16x16_c: 5.7 ( 1.00x) put_uni_h_luma_8_16x16_neon: 1.2 ( 4.67x) put_uni_h_luma_8_32x32_c: 24.0 ( 1.00x) put_uni_h_luma_8_32x32_neon: 4.7 ( 5.07x) put_uni_h_luma_8_64x64_c: 90.0 ( 1.00x) put_uni_h_luma_8_64x64_neon: 17.0 ( 5.30x) put_uni_h_luma_8_128x128_c: 357.7 ( 1.00x) put_uni_h_luma_8_128x128_neon: 67.5 ( 5.30x)

Zhao Zhili committed 2 years ago

Commit 20f2bf51 parent 46f07ce4 files · +171 −59Browse files

Showing the changes to libavcodec (4 of 4 files). Show all

Unified · Split

4 files
  1. libavcodec/aarch64/h26x/dsp.h +13 −0
  2. libavcodec/aarch64/h26x/qpel_neon.S +143 −59
  3. libavcodec/aarch64/vvc/Makefile +1 −0
  4. libavcodec/aarch64/vvc/dsp_init.c +14 −0
libavcodec/aarch64/h26x/dsp.h+13−0
@@ -235,4 +235,17 @@ NEON8_FNPROTO(qpel_bi_hv, (uint8_t *dst, ptrdiff_t dststride, · 234 unmodified lines
235235 const uint8_t *src, ptrdiff_t srcstride, const int16_t *src2,
236236 int height, intptr_t mx, intptr_t my, int width), _i8mm);
237237
238+#undef NEON8_FNPROTO_PARTIAL_4
239+#define NEON8_FNPROTO_PARTIAL_4(fn, args, ext) \
240+ void ff_vvc_put_##fn##_h4_8_neon##ext args; \
241+ void ff_vvc_put_##fn##_h8_8_neon##ext args; \
242+ void ff_vvc_put_##fn##_h16_8_neon##ext args; \
243+ void ff_vvc_put_##fn##_h32_8_neon##ext args;
244+
245+NEON8_FNPROTO_PARTIAL_4(qpel, (int16_t *dst, const uint8_t *_src, ptrdiff_t _srcstride, int height,
246+ const int8_t *hf, const int8_t *vf, int width),)
247+
248+NEON8_FNPROTO_PARTIAL_4(qpel_uni, (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src,
249+ ptrdiff_t _srcstride, int height, const int8_t *hf, const int8_t *vf, int width),)
250+
238251 #endif
libavcodec/aarch64/h26x/qpel_neon.S+143−59
@@ -21,7 +21,8 @@ · 20 unmodified lines
2121 */
2222
2323 #include "libavutil/aarch64/asm.S"
24−#define MAX_PB_SIZE 64
24+#define HEVC_MAX_PB_SIZE 64
25+#define VVC_MAX_PB_SIZE 128
2526
2627 const qpel_filters, align=4
2728 .byte 0, 0, 0, 0, 0, 0, 0, 0
@@ -44,6 +45,11 @@ endconst · 16 unmodified lines
4445 sxtl v0.8h, v0.8b
4546 .endm
4647
48+.macro vvc_load_filter m
49+ ld1 {v0.8b}, [\m]
50+ sxtl v0.8h, v0.8b
51+.endm
52+
4753 .macro load_qpel_filterb freg, xreg
4854 movrel \xreg, qpel_filters_abs
4955 add \xreg, \xreg, \freg, lsl #3
@@ -212,22 +218,40 @@ function ff_hevc_put_hevc_h4_8_neon, export=0 · 162 unmodified lines
212218 endfunc
213219 .endif
214220
221+.ifnc \type, qpel_bi
222+function ff_vvc_put_\type\()_h4_8_neon, export=1
223+ vvc_load_filter mx
224+ sub src, src, #3
225+ mov mx, x30
226+.ifc \type, qpel
227+ mov dststride, #(VVC_MAX_PB_SIZE << 1)
228+ lsl x13, srcstride, #1 // srcstridel
229+ mov x14, #(VVC_MAX_PB_SIZE << 2)
230+.else
231+ lsl x14, dststride, #1 // dststridel
232+ lsl x13, srcstride, #1 // srcstridel
233+.endif
234+ b 1f
235+endfunc
236+.endif // !qpel_bi
237+
215238 function ff_hevc_put_hevc_\type\()_h4_8_neon, export=1
216239 load_filter mx
217240 .ifc \type, qpel_bi
218− mov x16, #(MAX_PB_SIZE << 2) // src2bstridel
219− add x15, x4, #(MAX_PB_SIZE << 1) // src2b
241+ mov x16, #(HEVC_MAX_PB_SIZE << 2) // src2bstridel
242+ add x15, x4, #(HEVC_MAX_PB_SIZE << 1) // src2b
220243 .endif
221244 sub src, src, #3
222245 mov mx, x30
223246 .ifc \type, qpel
224− mov dststride, #(MAX_PB_SIZE << 1)
247+ mov dststride, #(HEVC_MAX_PB_SIZE << 1)
225248 lsl x13, srcstride, #1 // srcstridel
226− mov x14, #(MAX_PB_SIZE << 2)
249+ mov x14, #(HEVC_MAX_PB_SIZE << 2)
227250 .else
228251 lsl x14, dststride, #1 // dststridel
229252 lsl x13, srcstride, #1 // srcstridel
230253 .endif
254+1:
231255 add x10, dst, dststride // dstb
232256 add x12, src, srcstride // srcb
233257 0: ld1 {v16.8b, v17.8b}, [src], x13
@@ -283,15 +307,15 @@ endfunc · 49 unmodified lines
283307 function ff_hevc_put_hevc_\type\()_h6_8_neon, export=1
284308 load_filter mx
285309 .ifc \type, qpel_bi
286− mov x16, #(MAX_PB_SIZE << 2) // src2bstridel
287− add x15, x4, #(MAX_PB_SIZE << 1) // src2b
310+ mov x16, #(HEVC_MAX_PB_SIZE << 2) // src2bstridel
311+ add x15, x4, #(HEVC_MAX_PB_SIZE << 1) // src2b
288312 .endif
289313 sub src, src, #3
290314 mov mx, x30
291315 .ifc \type, qpel
292− mov dststride, #(MAX_PB_SIZE << 1)
316+ mov dststride, #(HEVC_MAX_PB_SIZE << 1)
293317 lsl x13, srcstride, #1 // srcstridel
294− mov x14, #((MAX_PB_SIZE << 2) - 8)
318+ mov x14, #((HEVC_MAX_PB_SIZE << 2) - 8)
295319 .else
296320 lsl x14, dststride, #1 // dststridel
297321 lsl x13, srcstride, #1 // srcstridel
@@ -333,22 +357,40 @@ function ff_hevc_put_hevc_\type\()_h6_8_neon, export=1 · 35 unmodified lines
333357 ret mx
334358 endfunc
335359
360+.ifnc \type, qpel_bi
361+function ff_vvc_put_\type\()_h8_8_neon, export=1
362+ vvc_load_filter mx
363+ sub src, src, #3
364+ mov mx, x30
365+.ifc \type, qpel
366+ mov dststride, #(VVC_MAX_PB_SIZE << 1)
367+ lsl x13, srcstride, #1 // srcstridel
368+ mov x14, #(VVC_MAX_PB_SIZE << 2)
369+.else
370+ lsl x14, dststride, #1 // dststridel
371+ lsl x13, srcstride, #1 // srcstridel
372+.endif
373+ b 1f
374+endfunc
375+.endif // !qpel_bi
376+
336377 function ff_hevc_put_hevc_\type\()_h8_8_neon, export=1
337378 load_filter mx
338379 .ifc \type, qpel_bi
339− mov x16, #(MAX_PB_SIZE << 2) // src2bstridel
340− add x15, x4, #(MAX_PB_SIZE << 1) // src2b
380+ mov x16, #(HEVC_MAX_PB_SIZE << 2) // src2bstridel
381+ add x15, x4, #(HEVC_MAX_PB_SIZE << 1) // src2b
341382 .endif
342383 sub src, src, #3
343384 mov mx, x30
344385 .ifc \type, qpel
345− mov dststride, #(MAX_PB_SIZE << 1)
386+ mov dststride, #(HEVC_MAX_PB_SIZE << 1)
346387 lsl x13, srcstride, #1 // srcstridel
347− mov x14, #(MAX_PB_SIZE << 2)
388+ mov x14, #(HEVC_MAX_PB_SIZE << 2)
348389 .else
349390 lsl x14, dststride, #1 // dststridel
350391 lsl x13, srcstride, #1 // srcstridel
351392 .endif
393+1:
352394 add x10, dst, dststride // dstb
353395 add x12, src, srcstride // srcb
354396 0: ld1 {v16.8b, v17.8b}, [src], x13
@@ -415,16 +457,16 @@ function ff_hevc_put_hevc_\type\()_h12_8_neon, export=1 · 60 unmodified lines
415457 sxtw height, heightw
416458 .ifc \type, qpel_bi
417459 ldrh w8, [sp] // width
418− mov x16, #(MAX_PB_SIZE << 2) // src2bstridel
419− lsl x17, height, #7 // src2b reset (height * (MAX_PB_SIZE << 1))
420− add x15, x4, #(MAX_PB_SIZE << 1) // src2b
460+ mov x16, #(HEVC_MAX_PB_SIZE << 2) // src2bstridel
461+ lsl x17, height, #7 // src2b reset (height * (HEVC_MAX_PB_SIZE << 1))
462+ add x15, x4, #(HEVC_MAX_PB_SIZE << 1) // src2b
421463 .endif
422464 sub src, src, #3
423465 mov mx, x30
424466 .ifc \type, qpel
425− mov dststride, #(MAX_PB_SIZE << 1)
467+ mov dststride, #(HEVC_MAX_PB_SIZE << 1)
426468 lsl x13, srcstride, #1 // srcstridel
427− mov x14, #((MAX_PB_SIZE << 2) - 16)
469+ mov x14, #((HEVC_MAX_PB_SIZE << 2) - 16)
428470 .else
429471 lsl x14, dststride, #1 // dststridel
430472 lsl x13, srcstride, #1 // srcstridel
@@ -497,25 +539,45 @@ function ff_hevc_put_hevc_\type\()_h12_8_neon, export=1 · 66 unmodified lines
497539 ret mx
498540 endfunc
499541
542+.ifnc \type, qpel_bi
543+function ff_vvc_put_\type\()_h16_8_neon, export=1
544+ vvc_load_filter mx
545+ sxtw height, heightw
546+ mov mx, x30
547+ sub src, src, #3
548+ mov mx, x30
549+.ifc \type, qpel
550+ mov dststride, #(VVC_MAX_PB_SIZE << 1)
551+ lsl x13, srcstride, #1 // srcstridel
552+ mov x14, #(VVC_MAX_PB_SIZE << 2)
553+.else
554+ lsl x14, dststride, #1 // dststridel
555+ lsl x13, srcstride, #1 // srcstridel
556+.endif
557+ b 0f
558+endfunc
559+.endif // !qpel_bi
560+
500561 function ff_hevc_put_hevc_\type\()_h16_8_neon, export=1
501562 load_filter mx
502563 sxtw height, heightw
503564 mov mx, x30
504565 .ifc \type, qpel_bi
505566 ldrh w8, [sp] // width
506− mov x16, #(MAX_PB_SIZE << 2) // src2bstridel
507− add x15, x4, #(MAX_PB_SIZE << 1) // src2b
567+ mov x16, #(HEVC_MAX_PB_SIZE << 2) // src2bstridel
568+ add x15, x4, #(HEVC_MAX_PB_SIZE << 1) // src2b
508569 .endif
509570 sub src, src, #3
510571 mov mx, x30
511572 .ifc \type, qpel
512− mov dststride, #(MAX_PB_SIZE << 1)
573+ mov dststride, #(HEVC_MAX_PB_SIZE << 1)
513574 lsl x13, srcstride, #1 // srcstridel
514− mov x14, #(MAX_PB_SIZE << 2)
575+ mov x14, #(HEVC_MAX_PB_SIZE << 2)
515576 .else
516577 lsl x14, dststride, #1 // dststridel
517578 lsl x13, srcstride, #1 // srcstridel
518579 .endif
580+0:
519581 add x10, dst, dststride // dstb
520582 add x12, src, srcstride // srcb
521583
@@ -555,29 +617,51 @@ function ff_hevc_put_hevc_\type\()_h16_8_neon, export=1 · 33 unmodified lines
555617 ret mx
556618 endfunc
557619
620+.ifnc \type, qpel_bi
621+function ff_vvc_put_\type\()_h32_8_neon, export=1
622+ vvc_load_filter mx
623+ sxtw height, heightw
624+ mov mx, x30
625+ sub src, src, #3
626+ mov mx, x30
627+.ifc \type, qpel
628+ mov dststride, #(VVC_MAX_PB_SIZE << 1)
629+ lsl x13, srcstride, #1 // srcstridel
630+ mov x14, #(VVC_MAX_PB_SIZE << 2)
631+ sub x14, x14, width, uxtw #1
632+.else
633+ lsl x14, dststride, #1 // dststridel
634+ lsl x13, srcstride, #1 // srcstridel
635+ sub x14, x14, width, uxtw
636+.endif
637+ b 1f
638+endfunc
639+.endif // !qpel_bi
640+
558641 function ff_hevc_put_hevc_\type\()_h32_8_neon, export=1
559642 load_filter mx
560643 sxtw height, heightw
561644 mov mx, x30
562645 .ifc \type, qpel_bi
563646 ldrh w8, [sp] // width
564− mov x16, #(MAX_PB_SIZE << 2) // src2bstridel
647+ mov x16, #(HEVC_MAX_PB_SIZE << 2) // src2bstridel
565648 lsl x17, x5, #7 // src2b reset
566− add x15, x4, #(MAX_PB_SIZE << 1) // src2b
649+ add x15, x4, #(HEVC_MAX_PB_SIZE << 1) // src2b
567650 sub x16, x16, width, uxtw #1
568651 .endif
569652 sub src, src, #3
570653 mov mx, x30
571654 .ifc \type, qpel
572− mov dststride, #(MAX_PB_SIZE << 1)
655+ mov dststride, #(HEVC_MAX_PB_SIZE << 1)
573656 lsl x13, srcstride, #1 // srcstridel
574− mov x14, #(MAX_PB_SIZE << 2)
657+ mov x14, #(HEVC_MAX_PB_SIZE << 2)
575658 sub x14, x14, width, uxtw #1
576659 .else
577660 lsl x14, dststride, #1 // dststridel
578661 lsl x13, srcstride, #1 // srcstridel
579662 sub x14, x14, width, uxtw
580663 .endif
664+1:
581665 sub x13, x13, width, uxtw
582666 sub x13, x13, #8
583667 add x10, dst, dststride // dstb
@@ -651,7 +735,7 @@ put_hevc qpel_bi · 67 unmodified lines
651735 function ff_hevc_put_hevc_qpel_v4_8_neon, export=1
652736 load_qpel_filterb x5, x4
653737 sub x1, x1, x2, lsl #1
654− mov x9, #(MAX_PB_SIZE * 2)
738+ mov x9, #(HEVC_MAX_PB_SIZE * 2)
655739 sub x1, x1, x2
656740 ldr s16, [x1]
657741 ldr s17, [x1, x2]
@@ -680,7 +764,7 @@ endfunc · 22 unmodified lines
680764 function ff_hevc_put_hevc_qpel_v6_8_neon, export=1
681765 load_qpel_filterb x5, x4
682766 sub x1, x1, x2, lsl #1
683− mov x9, #(MAX_PB_SIZE * 2 - 8)
767+ mov x9, #(HEVC_MAX_PB_SIZE * 2 - 8)
684768 sub x1, x1, x2
685769 ldr d16, [x1]
686770 ldr d17, [x1, x2]
@@ -709,7 +793,7 @@ endfunc · 22 unmodified lines
709793 function ff_hevc_put_hevc_qpel_v8_8_neon, export=1
710794 load_qpel_filterb x5, x4
711795 sub x1, x1, x2, lsl #1
712− mov x9, #(MAX_PB_SIZE * 2)
796+ mov x9, #(HEVC_MAX_PB_SIZE * 2)
713797 sub x1, x1, x2
714798 ldr d16, [x1]
715799 ldr d17, [x1, x2]
@@ -737,7 +821,7 @@ endfunc · 21 unmodified lines
737821 function ff_hevc_put_hevc_qpel_v12_8_neon, export=1
738822 load_qpel_filterb x5, x4
739823 sub x1, x1, x2, lsl #1
740− mov x9, #(MAX_PB_SIZE * 2 - 16)
824+ mov x9, #(HEVC_MAX_PB_SIZE * 2 - 16)
741825 sub x1, x1, x2
742826 ldr q16, [x1]
743827 ldr q17, [x1, x2]
@@ -768,7 +852,7 @@ endfunc · 24 unmodified lines
768852 function ff_hevc_put_hevc_qpel_v16_8_neon, export=1
769853 load_qpel_filterb x5, x4
770854 sub x1, x1, x2, lsl #1
771− mov x9, #(MAX_PB_SIZE * 2)
855+ mov x9, #(HEVC_MAX_PB_SIZE * 2)
772856 sub x1, x1, x2
773857 ldr q16, [x1]
774858 ldr q17, [x1, x2]
@@ -802,7 +886,7 @@ function ff_hevc_put_hevc_qpel_v24_8_neon, export=1 · 27 unmodified lines
802886 load_qpel_filterb x5, x4
803887 sub x1, x1, x2, lsl #1
804888 sub x1, x1, x2
805− mov x9, #(MAX_PB_SIZE * 2)
889+ mov x9, #(HEVC_MAX_PB_SIZE * 2)
806890 ld1 {v16.16b, v17.16b}, [x1], x2
807891 ld1 {v18.16b, v19.16b}, [x1], x2
808892 ld1 {v20.16b, v21.16b}, [x1], x2
@@ -833,7 +917,7 @@ function ff_hevc_put_hevc_qpel_v32_8_neon, export=1 · 24 unmodified lines
833917 st1 {v8.8b-v11.8b}, [sp]
834918 load_qpel_filterb x5, x4
835919 sub x1, x1, x2, lsl #1
836− mov x9, #(MAX_PB_SIZE * 2)
920+ mov x9, #(HEVC_MAX_PB_SIZE * 2)
837921 sub x1, x1, x2
838922 ld1 {v16.16b, v17.16b}, [x1], x2
839923 ld1 {v18.16b, v19.16b}, [x1], x2
@@ -883,7 +967,7 @@ function ff_hevc_put_hevc_qpel_v64_8_neon, export=1 · 43 unmodified lines
883967 load_qpel_filterb x5, x4
884968 sub x1, x1, x2, lsl #1
885969 sub x1, x1, x2
886− mov x9, #(MAX_PB_SIZE * 2)
970+ mov x9, #(HEVC_MAX_PB_SIZE * 2)
887971 0: mov x8, x1 // src
888972 ld1 {v16.16b, v17.16b}, [x8], x2
889973 mov w11, w3 // height
@@ -921,7 +1005,7 @@ function ff_hevc_put_hevc_qpel_bi_v4_8_neon, export=1 · 31 unmodified lines
9211005 load_qpel_filterb x7, x6
9221006 sub x2, x2, x3, lsl #1
9231007 sub x2, x2, x3
924− mov x12, #(MAX_PB_SIZE * 2)
1008+ mov x12, #(HEVC_MAX_PB_SIZE * 2)
9251009 ld1 {v16.s}[0], [x2], x3
9261010 ld1 {v17.s}[0], [x2], x3
9271011 ld1 {v18.s}[0], [x2], x3
@@ -951,7 +1035,7 @@ function ff_hevc_put_hevc_qpel_bi_v6_8_neon, export=1 · 23 unmodified lines
9511035 ld1 {v16.8b}, [x2], x3
9521036 sub x1, x1, #4
9531037 ld1 {v17.8b}, [x2], x3
954− mov x12, #(MAX_PB_SIZE * 2)
1038+ mov x12, #(HEVC_MAX_PB_SIZE * 2)
9551039 ld1 {v18.8b}, [x2], x3
9561040 ld1 {v19.8b}, [x2], x3
9571041 ld1 {v20.8b}, [x2], x3
@@ -977,7 +1061,7 @@ function ff_hevc_put_hevc_qpel_bi_v8_8_neon, export=1 · 19 unmodified lines
9771061 load_qpel_filterb x7, x6
9781062 sub x2, x2, x3, lsl #1
9791063 sub x2, x2, x3
980− mov x12, #(MAX_PB_SIZE * 2)
1064+ mov x12, #(HEVC_MAX_PB_SIZE * 2)
9811065 ld1 {v16.8b}, [x2], x3
9821066 ld1 {v17.8b}, [x2], x3
9831067 ld1 {v18.8b}, [x2], x3
@@ -1006,7 +1090,7 @@ function ff_hevc_put_hevc_qpel_bi_v12_8_neon, export=1 · 22 unmodified lines
10061090 sub x2, x2, x3
10071091 sub x1, x1, #8
10081092 ld1 {v16.16b}, [x2], x3
1009− mov x12, #(MAX_PB_SIZE * 2)
1093+ mov x12, #(HEVC_MAX_PB_SIZE * 2)
10101094 ld1 {v17.16b}, [x2], x3
10111095 ld1 {v18.16b}, [x2], x3
10121096 ld1 {v19.16b}, [x2], x3
@@ -1037,7 +1121,7 @@ function ff_hevc_put_hevc_qpel_bi_v16_8_neon, export=1 · 24 unmodified lines
10371121 load_qpel_filterb x7, x6
10381122 sub x2, x2, x3, lsl #1
10391123 sub x2, x2, x3
1040− mov x12, #(MAX_PB_SIZE * 2)
1124+ mov x12, #(HEVC_MAX_PB_SIZE * 2)
10411125 ld1 {v16.16b}, [x2], x3
10421126 ld1 {v17.16b}, [x2], x3
10431127 ld1 {v18.16b}, [x2], x3
@@ -1092,7 +1176,7 @@ function ff_hevc_put_hevc_qpel_bi_v32_8_neon, export=1 · 48 unmodified lines
10921176 sub x2, x2, x3
10931177 load_qpel_filterb x7, x6
10941178 ldr w6, [sp, #64]
1095− mov x12, #(MAX_PB_SIZE * 2)
1179+ mov x12, #(HEVC_MAX_PB_SIZE * 2)
10961180 0: mov x8, x2 // src
10971181 ld1 {v16.16b, v17.16b}, [x8], x3
10981182 mov w11, w5 // height
@@ -2147,7 +2231,7 @@ function ff_hevc_put_hevc_qpel_uni_w_v64_8_neon, export=1 · 1048 unmodified lines
21472231 endfunc
21482232
21492233 function hevc_put_hevc_qpel_uni_hv4_8_end_neon
2150− mov x9, #(MAX_PB_SIZE * 2)
2234+ mov x9, #(HEVC_MAX_PB_SIZE * 2)
21512235 load_qpel_filterh x6, x5
21522236 ldr d16, [sp]
21532237 ldr d17, [sp, x9]
@@ -2174,7 +2258,7 @@ function hevc_put_hevc_qpel_uni_hv4_8_end_neon · 20 unmodified lines
21742258 endfunc
21752259
21762260 function hevc_put_hevc_qpel_uni_hv6_8_end_neon
2177− mov x9, #(MAX_PB_SIZE * 2)
2261+ mov x9, #(HEVC_MAX_PB_SIZE * 2)
21782262 load_qpel_filterh x6, x5
21792263 sub x1, x1, #4
21802264 ldr q16, [sp]
@@ -2204,7 +2288,7 @@ function hevc_put_hevc_qpel_uni_hv6_8_end_neon · 23 unmodified lines
22042288 endfunc
22052289
22062290 function hevc_put_hevc_qpel_uni_hv8_8_end_neon
2207− mov x9, #(MAX_PB_SIZE * 2)
2291+ mov x9, #(HEVC_MAX_PB_SIZE * 2)
22082292 load_qpel_filterh x6, x5
22092293 ldr q16, [sp]
22102294 ldr q17, [sp, x9]
@@ -2232,7 +2316,7 @@ function hevc_put_hevc_qpel_uni_hv8_8_end_neon · 21 unmodified lines
22322316 endfunc
22332317
22342318 function hevc_put_hevc_qpel_uni_hv12_8_end_neon
2235− mov x9, #(MAX_PB_SIZE * 2)
2319+ mov x9, #(HEVC_MAX_PB_SIZE * 2)
22362320 load_qpel_filterh x6, x5
22372321 sub x1, x1, #8
22382322 ld1 {v16.8h, v17.8h}, [sp], x9
@@ -2260,7 +2344,7 @@ function hevc_put_hevc_qpel_uni_hv12_8_end_neon · 21 unmodified lines
22602344 endfunc
22612345
22622346 function hevc_put_hevc_qpel_uni_hv16_8_end_neon
2263− mov x9, #(MAX_PB_SIZE * 2)
2347+ mov x9, #(HEVC_MAX_PB_SIZE * 2)
22642348 load_qpel_filterh x6, x5
22652349 sub w12, w9, w7, lsl #1
22662350 0: mov x8, sp // src
@@ -3355,7 +3439,7 @@ endfunc · 1088 unmodified lines
33553439
33563440 function ff_hevc_put_hevc_qpel_h4_8_neon_i8mm, export=1
33573441 QPEL_H_HEADER
3358− mov x10, #MAX_PB_SIZE * 2
3442+ mov x10, #HEVC_MAX_PB_SIZE * 2
33593443 1:
33603444 ld1 {v0.16b}, [x1], x2
33613445 ext v1.16b, v0.16b, v0.16b, #1
@@ -3378,7 +3462,7 @@ endfunc · 16 unmodified lines
33783462
33793463 function ff_hevc_put_hevc_qpel_h6_8_neon_i8mm, export=1
33803464 QPEL_H_HEADER
3381− mov x10, #MAX_PB_SIZE * 2
3465+ mov x10, #HEVC_MAX_PB_SIZE * 2
33823466 add x15, x0, #8
33833467 1:
33843468 ld1 {v0.16b}, [x1], x2
@@ -3411,7 +3495,7 @@ endfunc · 26 unmodified lines
34113495
34123496 function ff_hevc_put_hevc_qpel_h8_8_neon_i8mm, export=1
34133497 QPEL_H_HEADER
3414− mov x10, #MAX_PB_SIZE * 2
3498+ mov x10, #HEVC_MAX_PB_SIZE * 2
34153499 1:
34163500 ld1 {v0.16b}, [x1], x2
34173501 ext v1.16b, v0.16b, v0.16b, #1
@@ -3457,7 +3541,7 @@ endfunc · 39 unmodified lines
34573541
34583542 function ff_hevc_put_hevc_qpel_h12_8_neon_i8mm, export=1
34593543 QPEL_H_HEADER
3460− mov x10, #MAX_PB_SIZE * 2
3544+ mov x10, #HEVC_MAX_PB_SIZE * 2
34613545 add x15, x0, #16
34623546 1:
34633547 ld1 {v16.16b, v17.16b}, [x1], x2
@@ -3495,7 +3579,7 @@ endfunc · 31 unmodified lines
34953579
34963580 function ff_hevc_put_hevc_qpel_h16_8_neon_i8mm, export=1
34973581 QPEL_H_HEADER
3498− mov x10, #MAX_PB_SIZE * 2
3582+ mov x10, #HEVC_MAX_PB_SIZE * 2
34993583 1:
35003584 ld1 {v16.16b, v17.16b}, [x1], x2
35013585 ext v1.16b, v16.16b, v17.16b, #1
@@ -3533,7 +3617,7 @@ endfunc · 31 unmodified lines
35333617
35343618 function ff_hevc_put_hevc_qpel_h24_8_neon_i8mm, export=1
35353619 QPEL_H_HEADER
3536− mov x10, #MAX_PB_SIZE * 2
3620+ mov x10, #HEVC_MAX_PB_SIZE * 2
35373621 add x15, x0, #32
35383622 1:
35393623 ld1 {v16.16b, v17.16b}, [x1], x2
@@ -3585,7 +3669,7 @@ endfunc · 45 unmodified lines
35853669
35863670 function ff_hevc_put_hevc_qpel_h32_8_neon_i8mm, export=1
35873671 QPEL_H_HEADER
3588− mov x10, #MAX_PB_SIZE * 2
3672+ mov x10, #HEVC_MAX_PB_SIZE * 2
35893673 add x15, x0, #32
35903674 1:
35913675 ld1 {v16.16b, v17.16b, v18.16b}, [x1], x2
@@ -3642,7 +3726,7 @@ endfunc · 50 unmodified lines
36423726
36433727 function ff_hevc_put_hevc_qpel_h48_8_neon_i8mm, export=1
36443728 QPEL_H_HEADER
3645− mov x10, #MAX_PB_SIZE * 2 - 64
3729+ mov x10, #HEVC_MAX_PB_SIZE * 2 - 64
36463730 1:
36473731 ld1 {v16.16b, v17.16b, v18.16b, v19.16b}, [x1], x2
36483732 ext v1.16b, v16.16b, v17.16b, #1
@@ -4173,7 +4257,7 @@ DISABLE_I8MM · 524 unmodified lines
41734257 stp x24, x25, [sp, #48]
41744258 stp x26, x27, [sp, #64]
41754259 mov x19, sp
4176− mov x11, #(MAX_PB_SIZE*(MAX_PB_SIZE+8)*2)
4260+ mov x11, #(HEVC_MAX_PB_SIZE*(HEVC_MAX_PB_SIZE+8)*2)
41774261 sub sp, sp, x11
41784262 mov x20, x0
41794263 mov x21, x1
@@ -4204,7 +4288,7 @@ DISABLE_I8MM · 24 unmodified lines
42044288 add x9, x9, x23, lsl #3
42054289 ld1 {v0.8b}, [x9]
42064290 sxtl v0.8h, v0.8b
4207− mov x10, #(MAX_PB_SIZE * 2)
4291+ mov x10, #(HEVC_MAX_PB_SIZE * 2)
42084292 dup v28.4s, w24
42094293 dup v29.4s, w25
42104294 dup v30.4s, w26
@@ -4591,7 +4675,7 @@ endfunc · 380 unmodified lines
45914675 qpel_uni_w_hv neon
45924676
45934677 function hevc_put_hevc_qpel_bi_hv4_8_end_neon
4594− mov x9, #(MAX_PB_SIZE * 2)
4678+ mov x9, #(HEVC_MAX_PB_SIZE * 2)
45954679 load_qpel_filterh x7, x6
45964680 ld1 {v16.4h}, [sp], x9
45974681 ld1 {v17.4h}, [sp], x9
@@ -4617,7 +4701,7 @@ function hevc_put_hevc_qpel_bi_hv4_8_end_neon · 19 unmodified lines
46174701 endfunc
46184702
46194703 function hevc_put_hevc_qpel_bi_hv6_8_end_neon
4620− mov x9, #(MAX_PB_SIZE * 2)
4704+ mov x9, #(HEVC_MAX_PB_SIZE * 2)
46214705 load_qpel_filterh x7, x6
46224706 sub x1, x1, #4
46234707 ld1 {v16.8h}, [sp], x9
@@ -4648,7 +4732,7 @@ function hevc_put_hevc_qpel_bi_hv6_8_end_neon · 24 unmodified lines
46484732 endfunc
46494733
46504734 function hevc_put_hevc_qpel_bi_hv8_8_end_neon
4651− mov x9, #(MAX_PB_SIZE * 2)
4735+ mov x9, #(HEVC_MAX_PB_SIZE * 2)
46524736 load_qpel_filterh x7, x6
46534737 ld1 {v16.8h}, [sp], x9
46544738 ld1 {v17.8h}, [sp], x9
@@ -4678,7 +4762,7 @@ endfunc · 23 unmodified lines
46784762
46794763 function hevc_put_hevc_qpel_bi_hv16_8_end_neon
46804764 load_qpel_filterh x7, x8
4681− mov x9, #(MAX_PB_SIZE * 2)
4765+ mov x9, #(HEVC_MAX_PB_SIZE * 2)
46824766 mov x10, x6
46834767 0: mov x8, sp // src
46844768 ld1 {v16.8h, v17.8h}, [x8], x9
libavcodec/aarch64/vvc/Makefile+1−0
@@ -3,4 +3,5 @@ clean:: · 2 unmodified lines
33
44 OBJS-$(CONFIG_VVC_DECODER) += aarch64/vvc/dsp_init.o
55 NEON-OBJS-$(CONFIG_VVC_DECODER) += aarch64/vvc/alf.o \
6+ aarch64/h26x/qpel_neon.o \
67 aarch64/h26x/sao_neon.o
libavcodec/aarch64/vvc/dsp_init.c+14−0
@@ -46,6 +46,20 @@ void ff_vvc_dsp_init_aarch64(VVCDSPContext *const c, const int bd) · 45 unmodified lines
4646 return;
4747
4848 if (bd == 8) {
49+ c->inter.put[0][1][0][1] = ff_vvc_put_qpel_h4_8_neon;
50+ c->inter.put[0][2][0][1] = ff_vvc_put_qpel_h8_8_neon;
51+ c->inter.put[0][3][0][1] = ff_vvc_put_qpel_h16_8_neon;
52+ c->inter.put[0][4][0][1] =
53+ c->inter.put[0][5][0][1] =
54+ c->inter.put[0][6][0][1] = ff_vvc_put_qpel_h32_8_neon;
55+
56+ c->inter.put_uni[0][1][0][1] = ff_vvc_put_qpel_uni_h4_8_neon;
57+ c->inter.put_uni[0][2][0][1] = ff_vvc_put_qpel_uni_h8_8_neon;
58+ c->inter.put_uni[0][3][0][1] = ff_vvc_put_qpel_uni_h16_8_neon;
59+ c->inter.put_uni[0][4][0][1] =
60+ c->inter.put_uni[0][5][0][1] =
61+ c->inter.put_uni[0][6][0][1] = ff_vvc_put_qpel_uni_h32_8_neon;
62+
4963 for (int i = 0; i < FF_ARRAY_ELEMS(c->sao.band_filter); i++)
5064 c->sao.band_filter[i] = ff_h26x_sao_band_filter_8x8_8_neon;
5165 c->sao.edge_filter[0] = ff_vvc_sao_edge_filter_8x8_8_neon;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t