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
00033 void ff_ac3_bit_alloc_calc_bap_armv6(int16_t *mask, int16_t *psd,
00034 int start, int end,
00035 int snr_offset, int floor,
00036 const uint8_t *bap_tab, uint8_t *bap);
00037
00038 void ff_ac3_update_bap_counts_arm(uint16_t mant_cnt[16], uint8_t *bap, int len);
00039
00040 av_cold void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact)
00041 {
00042 c->update_bap_counts = ff_ac3_update_bap_counts_arm;
00043
00044 if (HAVE_ARMV6) {
00045 c->bit_alloc_calc_bap = ff_ac3_bit_alloc_calc_bap_armv6;
00046 }
00047
00048 if (HAVE_NEON) {
00049 c->ac3_exponent_min = ff_ac3_exponent_min_neon;
00050 c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_neon;
00051 c->ac3_lshift_int16 = ff_ac3_lshift_int16_neon;
00052 c->ac3_rshift_int32 = ff_ac3_rshift_int32_neon;
00053 c->float_to_fixed24 = ff_float_to_fixed24_neon;
00054 c->extract_exponents = ff_ac3_extract_exponents_neon;
00055 }
00056 }