Showing the changes to libavcodec (2 of 3 files). Show all
Unified · Split
| @@ -28,6 +28,10 @@ · 27 unmodified lines | |||
| 28 | void ff_ac3_exponent_min_neon(uint8_t *exp, int num_reuse_blocks, int nb_coefs); | 28 | void ff_ac3_exponent_min_neon(uint8_t *exp, int num_reuse_blocks, int nb_coefs); |
| 29 | void ff_ac3_extract_exponents_neon(uint8_t *exp, int32_t *coef, int nb_coefs); | 29 | void ff_ac3_extract_exponents_neon(uint8_t *exp, int32_t *coef, int nb_coefs); |
| 30 | void ff_float_to_fixed24_neon(int32_t *dst, const float *src, size_t len); | 30 | void ff_float_to_fixed24_neon(int32_t *dst, const float *src, size_t len); |
| 31 | void 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 | ||
| 32 | av_cold void ff_ac3dsp_init_aarch64(AC3DSPContext *c) | 36 | av_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 | } |
| @@ -64,3 +64,26 @@ function ff_float_to_fixed24_neon, export=1 · 63 unmodified lines | |||
| 64 | b.ne 1b | 64 | b.ne 1b |
| 65 | ret | 65 | ret |
| 66 | endfunc | 66 | endfunc |
| 67 | |||
| 68 | function 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 | ||
| 73 | 1: 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 | ||
| 89 | endfunc | ||