OLD | NEW |
1 /* | 1 /* |
2 * copyright (c) 2001 Fabrice Bellard | 2 * copyright (c) 2001 Fabrice Bellard |
3 * | 3 * |
4 * This file is part of FFmpeg. | 4 * This file is part of FFmpeg. |
5 * | 5 * |
6 * FFmpeg is free software; you can redistribute it and/or | 6 * FFmpeg is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Lesser General Public | 7 * modify it under the terms of the GNU Lesser General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2.1 of the License, or (at your option) any later version. | 9 * version 2.1 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } MPADecodeHeader; | 125 } MPADecodeHeader; |
126 | 126 |
127 typedef struct MPADecodeContext { | 127 typedef struct MPADecodeContext { |
128 MPA_DECODE_HEADER | 128 MPA_DECODE_HEADER |
129 uint8_t last_buf[2*BACKSTEP_SIZE + EXTRABYTES]; | 129 uint8_t last_buf[2*BACKSTEP_SIZE + EXTRABYTES]; |
130 int last_buf_size; | 130 int last_buf_size; |
131 /* next header (used in free format parsing) */ | 131 /* next header (used in free format parsing) */ |
132 uint32_t free_format_next_header; | 132 uint32_t free_format_next_header; |
133 GetBitContext gb; | 133 GetBitContext gb; |
134 GetBitContext in_gb; | 134 GetBitContext in_gb; |
135 DECLARE_ALIGNED_16(MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512 * 2]; | 135 DECLARE_ALIGNED(16, MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512 * 2]; |
136 int synth_buf_offset[MPA_MAX_CHANNELS]; | 136 int synth_buf_offset[MPA_MAX_CHANNELS]; |
137 DECLARE_ALIGNED_16(int32_t, sb_samples)[MPA_MAX_CHANNELS][36][SBLIMIT]; | 137 DECLARE_ALIGNED(16, int32_t, sb_samples)[MPA_MAX_CHANNELS][36][SBLIMIT]; |
138 int32_t mdct_buf[MPA_MAX_CHANNELS][SBLIMIT * 18]; /* previous samples, for l
ayer 3 MDCT */ | 138 int32_t mdct_buf[MPA_MAX_CHANNELS][SBLIMIT * 18]; /* previous samples, for l
ayer 3 MDCT */ |
139 GranuleDef granules[2][2]; /* Used in Layer 3 */ | 139 GranuleDef granules[2][2]; /* Used in Layer 3 */ |
140 #ifdef DEBUG | 140 #ifdef DEBUG |
141 int frame_count; | 141 int frame_count; |
142 #endif | 142 #endif |
143 void (*compute_antialias)(struct MPADecodeContext *s, struct GranuleDef *g); | 143 void (*compute_antialias)(struct MPADecodeContext *s, struct GranuleDef *g); |
144 int adu_mode; ///< 0 for standard mp3, 1 for adu formatted mp3 | 144 int adu_mode; ///< 0 for standard mp3, 1 for adu formatted mp3 |
145 int dither_state; | 145 int dither_state; |
146 int error_recognition; | 146 int error_recognition; |
147 AVCodecContext* avctx; | 147 AVCodecContext* avctx; |
(...skipping 26 matching lines...) Expand all Loading... |
174 /* bit rate */ | 174 /* bit rate */ |
175 if ((header & (0xf<<12)) == 0xf<<12) | 175 if ((header & (0xf<<12)) == 0xf<<12) |
176 return -1; | 176 return -1; |
177 /* frequency */ | 177 /* frequency */ |
178 if ((header & (3<<10)) == 3<<10) | 178 if ((header & (3<<10)) == 3<<10) |
179 return -1; | 179 return -1; |
180 return 0; | 180 return 0; |
181 } | 181 } |
182 | 182 |
183 #endif /* AVCODEC_MPEGAUDIO_H */ | 183 #endif /* AVCODEC_MPEGAUDIO_H */ |
OLD | NEW |