Revision d9b1c197 libavcodec/mpegaudio.h

View differences:

libavcodec/mpegaudio.h
22 22
#define SAME_HEADER_MASK \
23 23
   (0xffe00000 | (3 << 17) | (0xf << 12) | (3 << 10) | (3 << 19))
24 24

  
25
/* define USE_HIGHPRECISION to have a bit exact (but slower) mpeg
26
   audio decoder */
27

  
28
#ifdef USE_HIGHPRECISION
29
#define FRAC_BITS   23   /* fractional bits for sb_samples and dct */
30
#define WFRAC_BITS  16   /* fractional bits for window */
31
#else
32
#define FRAC_BITS   15   /* fractional bits for sb_samples and dct */
33
#define WFRAC_BITS  14   /* fractional bits for window */
34
#endif
35

  
36
#if defined(USE_HIGHPRECISION) && defined(CONFIG_AUDIO_NONSHORT)
37
typedef int32_t OUT_INT;
38
#define OUT_MAX INT32_MAX
39
#define OUT_MIN INT32_MIN
40
#define OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 31)
41
#else
42
typedef int16_t OUT_INT;
43
#define OUT_MAX INT16_MAX
44
#define OUT_MIN INT16_MIN
45
#define OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 15)
46
#endif
47

  
48
#if FRAC_BITS <= 15
49
typedef int16_t MPA_INT;
50
#else
51
typedef int32_t MPA_INT;
52
#endif
53

  
25 54
int l2_select_table(int bitrate, int nb_channels, int freq, int lsf);
26 55
int mpa_decode_header(AVCodecContext *avctx, uint32_t head);
56
void ff_mpa_synth_init(MPA_INT *window);
57
void ff_mpa_synth_filter(MPA_INT *synth_buf_ptr, int *synth_buf_offset,
58
			 MPA_INT *window, int *dither_state,
59
                         OUT_INT *samples, int incr,
60
                         int32_t sb_samples[SBLIMIT]);
27 61

  
28 62
extern const uint16_t mpa_bitrate_tab[2][3][15];
29 63
extern const uint16_t mpa_freq_tab[3];

Also available in: Unified diff