History

avcodec/ac3: Implement sum_square_butterfly_int32 for aarch64 NEON

Geoff Hill committed 2 years ago

Commit 42e88f11 parent 69cb34f3 files · +55 −0Browse files

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

Unified · Split

2 files
  1. libavcodec/aarch64/ac3dsp_init_aarch64.c +5 −0
  2. libavcodec/aarch64/ac3dsp_neon.S +23 −0
libavcodec/aarch64/ac3dsp_init_aarch64.c+5−0
@@ -28,6 +28,10 @@ · 27 unmodified lines
28void ff_ac3_exponent_min_neon(uint8_t *exp, int num_reuse_blocks, int nb_coefs);28void ff_ac3_exponent_min_neon(uint8_t *exp, int num_reuse_blocks, int nb_coefs);
29void ff_ac3_extract_exponents_neon(uint8_t *exp, int32_t *coef, int nb_coefs);29void ff_ac3_extract_exponents_neon(uint8_t *exp, int32_t *coef, int nb_coefs);
30void ff_float_to_fixed24_neon(int32_t *dst, const float *src, size_t len);30void ff_float_to_fixed24_neon(int32_t *dst, const float *src, size_t len);
31void ff_ac3_sum_square_butterfly_int32_neon(int64_t sum[4],
32 const int32_t *coef0,
33 const int32_t *coef1,
34 int len);
31 35
32av_cold void ff_ac3dsp_init_aarch64(AC3DSPContext *c)36av_cold void ff_ac3dsp_init_aarch64(AC3DSPContext *c)
33{37{
@@ -37,4 +41,5 @@ av_cold void ff_ac3dsp_init_aarch64(AC3DSPContext *c) · 3 unmodified lines
37 c->ac3_exponent_min = ff_ac3_exponent_min_neon;41 c->ac3_exponent_min = ff_ac3_exponent_min_neon;
38 c->extract_exponents = ff_ac3_extract_exponents_neon;42 c->extract_exponents = ff_ac3_extract_exponents_neon;
39 c->float_to_fixed24 = ff_float_to_fixed24_neon;43 c->float_to_fixed24 = ff_float_to_fixed24_neon;
44 c->sum_square_butterfly_int32 = ff_ac3_sum_square_butterfly_int32_neon;
40}45}
libavcodec/aarch64/ac3dsp_neon.S+23−0
@@ -64,3 +64,26 @@ function ff_float_to_fixed24_neon, export=1 · 63 unmodified lines
64 b.ne 1b64 b.ne 1b
65 ret65 ret
66endfunc66endfunc
67
68function ff_ac3_sum_square_butterfly_int32_neon, export=1
69 movi v0.2d, #0
70 movi v1.2d, #0
71 movi v2.2d, #0
72 movi v3.2d, #0
731: ld1 {v4.2s}, [x1], #8
74 ld1 {v5.2s}, [x2], #8
75 add v6.2s, v4.2s, v5.2s
76 sub v7.2s, v4.2s, v5.2s
77 smlal v0.2d, v4.2s, v4.2s
78 smlal v1.2d, v5.2s, v5.2s
79 smlal v2.2d, v6.2s, v6.2s
80 smlal v3.2d, v7.2s, v7.2s
81 subs w3, w3, #2
82 b.gt 1b
83 addp d0, v0.2d
84 addp d1, v1.2d
85 addp d2, v2.2d
86 addp d3, v3.2d
87 st1 {v0.1d-v3.1d}, [x0]
88 ret
89endfunc

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