00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AVCODEC_AC3DSP_H
00023 #define AVCODEC_AC3DSP_H
00024
00025 #include <stdint.h>
00026
00031 extern const uint16_t ff_ac3_bap_bits[16];
00032
00033 typedef struct AC3DSPContext {
00043 void (*ac3_exponent_min)(uint8_t *exp, int num_reuse_blocks, int nb_coefs);
00044
00054 int (*ac3_max_msb_abs_int16)(const int16_t *src, int len);
00055
00065 void (*ac3_lshift_int16)(int16_t *src, unsigned int len, unsigned int shift);
00066
00076 void (*ac3_rshift_int32)(int32_t *src, unsigned int len, unsigned int shift);
00077
00089 void (*float_to_fixed24)(int32_t *dst, const float *src, unsigned int len);
00090
00106 void (*bit_alloc_calc_bap)(int16_t *mask, int16_t *psd, int start, int end,
00107 int snr_offset, int floor,
00108 const uint8_t *bap_tab, uint8_t *bap);
00109
00117 void (*update_bap_counts)(uint16_t mant_cnt[16], uint8_t *bap, int len);
00118
00125 int (*compute_mantissa_size)(uint16_t mant_cnt[6][16]);
00126
00127 void (*extract_exponents)(uint8_t *exp, int32_t *coef, int nb_coefs);
00128
00129 void (*sum_square_butterfly_int32)(int64_t sum[4], const int32_t *coef0,
00130 const int32_t *coef1, int len);
00131
00132 void (*sum_square_butterfly_float)(float sum[4], const float *coef0,
00133 const float *coef1, int len);
00134 } AC3DSPContext;
00135
00136 void ff_ac3dsp_init (AC3DSPContext *c, int bit_exact);
00137 void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact);
00138 void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact);
00139
00140 #endif