comparison mpegaudio.h @ 5161:94c3f01c243c libavcodec

move a couple of macros and structs to mpegaudio.h
author mru
date Sat, 16 Jun 2007 22:58:43 +0000
parents d981eb275c8f
children 1d83e9c34641
comparison
equal deleted inserted replaced
5160:13386224ff72 5161:94c3f01c243c
60 #else 60 #else
61 #define FRAC_BITS 15 /* fractional bits for sb_samples and dct */ 61 #define FRAC_BITS 15 /* fractional bits for sb_samples and dct */
62 #define WFRAC_BITS 14 /* fractional bits for window */ 62 #define WFRAC_BITS 14 /* fractional bits for window */
63 #endif 63 #endif
64 64
65 #define FRAC_ONE (1 << FRAC_BITS)
66
67 #define FIX(a) ((int)((a) * FRAC_ONE))
68
65 #if defined(USE_HIGHPRECISION) && defined(CONFIG_AUDIO_NONSHORT) 69 #if defined(USE_HIGHPRECISION) && defined(CONFIG_AUDIO_NONSHORT)
66 typedef int32_t OUT_INT; 70 typedef int32_t OUT_INT;
67 #define OUT_MAX INT32_MAX 71 #define OUT_MAX INT32_MAX
68 #define OUT_MIN INT32_MIN 72 #define OUT_MIN INT32_MIN
69 #define OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 31) 73 #define OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 31)
114 int dither_state; 118 int dither_state;
115 int error_resilience; 119 int error_resilience;
116 AVCodecContext* avctx; 120 AVCodecContext* avctx;
117 } MPADecodeContext; 121 } MPADecodeContext;
118 122
123 /* layer 3 huffman tables */
124 typedef struct HuffTable {
125 int xsize;
126 const uint8_t *bits;
127 const uint16_t *codes;
128 } HuffTable;
129
119 int ff_mpa_l2_select_table(int bitrate, int nb_channels, int freq, int lsf); 130 int ff_mpa_l2_select_table(int bitrate, int nb_channels, int freq, int lsf);
120 int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate); 131 int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate);
121 void ff_mpa_synth_init(MPA_INT *window); 132 void ff_mpa_synth_init(MPA_INT *window);
122 void ff_mpa_synth_filter(MPA_INT *synth_buf_ptr, int *synth_buf_offset, 133 void ff_mpa_synth_filter(MPA_INT *synth_buf_ptr, int *synth_buf_offset,
123 MPA_INT *window, int *dither_state, 134 MPA_INT *window, int *dither_state,