00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <stdint.h>
00022 #include "libavutil/attributes.h"
00023 #include "libavcodec/ac3dsp.h"
00024 #include "config.h"
00025
00026 void ff_ac3_exponent_min_neon(uint8_t *exp, int num_reuse_blocks, int nb_coefs);
00027 int ff_ac3_max_msb_abs_int16_neon(const int16_t *src, int len);
00028 void ff_ac3_lshift_int16_neon(int16_t *src, unsigned len, unsigned shift);
00029 void ff_ac3_rshift_int32_neon(int32_t *src, unsigned len, unsigned shift);
00030 void ff_float_to_fixed24_neon(int32_t *dst, const float *src, unsigned int len);
00031 void ff_ac3_extract_exponents_neon(uint8_t *exp, int32_t *coef, int nb_coefs);
00032 void ff_ac3_sum_square_butterfly_int32_neon(int64_t sum[4],
00033 const int32_t *coef0,
00034 const int32_t *coef1,
00035 int len);
00036 void ff_ac3_sum_square_butterfly_float_neon(float sum[4],
00037 const float *coef0,
00038 const float *coef1,
00039 int len);
00040
00041 void ff_ac3_bit_alloc_calc_bap_armv6(int16_t *mask, int16_t *psd,
00042 int start, int end,
00043 int snr_offset, int floor,
00044 const uint8_t *bap_tab, uint8_t *bap);
00045
00046 void ff_ac3_update_bap_counts_arm(uint16_t mant_cnt[16], uint8_t *bap, int len);
00047
00048 av_cold void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact)
00049 {
00050 c->update_bap_counts = ff_ac3_update_bap_counts_arm;
00051
00052 if (HAVE_ARMV6) {
00053 c->bit_alloc_calc_bap = ff_ac3_bit_alloc_calc_bap_armv6;
00054 }
00055
00056 if (HAVE_NEON) {
00057 c->ac3_exponent_min = ff_ac3_exponent_min_neon;
00058 c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_neon;
00059 c->ac3_lshift_int16 = ff_ac3_lshift_int16_neon;
00060 c->ac3_rshift_int32 = ff_ac3_rshift_int32_neon;
00061 c->float_to_fixed24 = ff_float_to_fixed24_neon;
00062 c->extract_exponents = ff_ac3_extract_exponents_neon;
00063 c->sum_square_butterfly_int32 = ff_ac3_sum_square_butterfly_int32_neon;
00064 c->sum_square_butterfly_float = ff_ac3_sum_square_butterfly_float_neon;
00065 }
00066 }