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