Revision 4bd8e17c libavcodec/mpegaudio.h

View differences:

libavcodec/mpegaudio.h
23 23
 * mpeg audio declarations for both encoder and decoder.
24 24
 */
25 25

  
26
#ifndef MPEGAUDIO_H
27
#define MPEGAUDIO_H
28

  
29
#include "bitstream.h"
30
#include "dsputil.h"
31

  
26 32
/* max frame size, in samples */
27 33
#define MPA_FRAME_SIZE 1152
28 34

  
......
73 79
typedef int32_t MPA_INT;
74 80
#endif
75 81

  
82
#define BACKSTEP_SIZE 512
83
#define EXTRABYTES 24
84

  
85
struct GranuleDef;
86

  
87
typedef struct MPADecodeContext {
88
    DECLARE_ALIGNED_8(uint8_t, last_buf[2*BACKSTEP_SIZE + EXTRABYTES]);
89
    int last_buf_size;
90
    int frame_size;
91
    /* next header (used in free format parsing) */
92
    uint32_t free_format_next_header;
93
    int error_protection;
94
    int layer;
95
    int sample_rate;
96
    int sample_rate_index; /* between 0 and 8 */
97
    int bit_rate;
98
    GetBitContext gb;
99
    GetBitContext in_gb;
100
    int nb_channels;
101
    int mode;
102
    int mode_ext;
103
    int lsf;
104
    DECLARE_ALIGNED_16(MPA_INT, synth_buf[MPA_MAX_CHANNELS][512 * 2]);
105
    int synth_buf_offset[MPA_MAX_CHANNELS];
106
    DECLARE_ALIGNED_16(int32_t, sb_samples[MPA_MAX_CHANNELS][36][SBLIMIT]);
107
    int32_t mdct_buf[MPA_MAX_CHANNELS][SBLIMIT * 18]; /* previous samples, for layer 3 MDCT */
108
#ifdef DEBUG
109
    int frame_count;
110
#endif
111
    void (*compute_antialias)(struct MPADecodeContext *s, struct GranuleDef *g);
112
    int adu_mode; ///< 0 for standard mp3, 1 for adu formatted mp3
113
    int dither_state;
114
    int error_resilience;
115
    AVCodecContext* avctx;
116
} MPADecodeContext;
117

  
76 118
int l2_select_table(int bitrate, int nb_channels, int freq, int lsf);
77 119
int mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate);
78 120
void ff_mpa_synth_init(MPA_INT *window);
......
97 139
        return -1;
98 140
    return 0;
99 141
}
142

  
143
#endif /* MPEGAUDIO_H */

Also available in: Unified diff