Unified · Split
| @@ -11,21 +11,14 @@ · 10 unmodified lines | |||
| 11 | 11 | ||
| 12 | typedef struct | 12 | typedef struct |
| 13 | { | 13 | { |
| 14 | int frame_bytes; | 14 | int frame_bytes, channels, hz, layer, bitrate_kbps; |
| 15 | int channels; | ||
| 16 | int hz; | ||
| 17 | int layer; | ||
| 18 | int bitrate_kbps; | ||
| 19 | } mp3dec_frame_info_t; | 15 | } mp3dec_frame_info_t; |
| 20 | 16 | ||
| 21 | typedef struct | 17 | typedef struct |
| 22 | { | 18 | { |
| 23 | float mdct_overlap[2][9*32]; | 19 | float mdct_overlap[2][9*32], qmf_state[15*2*32]; |
| 24 | float qmf_state[15*2*32]; | 20 | int reserv, free_format_bytes; |
| 25 | int reserv; | 21 | unsigned char header[4], reserv_buf[511]; |
| 26 | int free_format_bytes; | ||
| 27 | unsigned char header[4]; | ||
| 28 | unsigned char reserv_buf[511]; | ||
| 29 | } mp3dec_t; | 22 | } mp3dec_t; |
| 30 | 23 | ||
| 31 | #ifdef __cplusplus | 24 | #ifdef __cplusplus |
| @@ -193,44 +186,27 @@ static int have_simd() · 161 unmodified lines | |||
| 193 | typedef struct | 186 | typedef struct |
| 194 | { | 187 | { |
| 195 | const uint8_t *buf; | 188 | const uint8_t *buf; |
| 196 | int pos; | 189 | int pos, limit; |
| 197 | int limit; | ||
| 198 | } bs_t; | 190 | } bs_t; |
| 199 | 191 | ||
| 200 | typedef struct | 192 | typedef struct |
| 201 | { | 193 | { |
| 202 | uint8_t total_bands; | 194 | uint8_t total_bands, stereo_bands, bitalloc[64], scfcod[64]; |
| 203 | uint8_t stereo_bands; | ||
| 204 | uint8_t bitalloc[64]; | ||
| 205 | uint8_t scfcod[64]; | ||
| 206 | float scf[3*64]; | 195 | float scf[3*64]; |
| 207 | } L12_scale_info; | 196 | } L12_scale_info; |
| 208 | 197 | ||
| 209 | typedef struct | 198 | typedef struct |
| 210 | { | 199 | { |
| 211 | uint8_t tab_offset; | 200 | uint8_t tab_offset, code_tab_width, band_count; |
| 212 | uint8_t code_tab_width; | ||
| 213 | uint8_t band_count; | ||
| 214 | } L12_subband_alloc_t; | 201 | } L12_subband_alloc_t; |
| 215 | 202 | ||
| 216 | typedef struct | 203 | typedef struct |
| 217 | { | 204 | { |
| 218 | const uint8_t *sfbtab; | 205 | const uint8_t *sfbtab; |
| 219 | uint16_t part_23_length; | 206 | uint16_t part_23_length, big_values, scalefac_compress; |
| 220 | uint16_t big_values; | 207 | uint8_t global_gain, block_type, mixed_block_flag, n_long_sfb, n_short_sfb; |
| 221 | uint16_t scalefac_compress; | 208 | uint8_t table_select[3], region_count[3], subblock_gain[3]; |
| 222 | uint8_t global_gain; | 209 | uint8_t preflag, scalefac_scale, count1_table, scfsi; |
| 223 | uint8_t block_type; | ||
| 224 | uint8_t mixed_block_flag; | ||
| 225 | uint8_t n_long_sfb; | ||
| 226 | uint8_t n_short_sfb; | ||
| 227 | uint8_t table_select[3]; | ||
| 228 | uint8_t region_count[3]; | ||
| 229 | uint8_t subblock_gain[3]; | ||
| 230 | uint8_t preflag; | ||
| 231 | uint8_t scalefac_scale; | ||
| 232 | uint8_t count1_table; | ||
| 233 | uint8_t scfsi; | ||
| 234 | } L3_gr_info_t; | 210 | } L3_gr_info_t; |
| 235 | 211 | ||
| 236 | typedef struct | 212 | typedef struct |
| @@ -238,10 +214,8 @@ typedef struct · 1 unmodified line | |||
| 238 | bs_t bs; | 214 | bs_t bs; |
| 239 | uint8_t maindata[MAX_BITRESERVOIR_BYTES + MAX_L3_FRAME_PAYLOAD_BYTES]; | 215 | uint8_t maindata[MAX_BITRESERVOIR_BYTES + MAX_L3_FRAME_PAYLOAD_BYTES]; |
| 240 | L3_gr_info_t gr_info[4]; | 216 | L3_gr_info_t gr_info[4]; |
| 241 | float grbuf[2][576]; | 217 | float grbuf[2][576], scf[40], syn[18 + 15][2*32]; |
| 242 | float scf[40]; | ||
| 243 | uint8_t ist_pos[2][39]; | 218 | uint8_t ist_pos[2][39]; |
| 244 | float syn[18 + 15][2*32]; | ||
| 245 | } mp3dec_scratch_t; | 219 | } mp3dec_scratch_t; |
| 246 | 220 | ||
| 247 | static void bs_init(bs_t *bs, const uint8_t *data, int bytes) | 221 | static void bs_init(bs_t *bs, const uint8_t *data, int bytes) |