Unified · Split
| @@ -192,12 +192,12 @@ av_cold void ff_atrac3p_init_vlcs(void) · 191 unmodified lines | ||
| 192 | 192 | |
| 193 | 193 | /* build huffman tables for spectrum decoding */ |
| 194 | 194 | for (i = 0; i < 112; i++) { |
| 195 | − if (atrac3p_spectra_tabs[i].cb) | |
| 195 | + if (atrac3p_spectra_tabs[i].redirect < 0) | |
| 196 | 196 | build_canonical_huff(atrac3p_spectra_tabs[i].cb, |
| 197 | 197 | atrac3p_spectra_tabs[i].xlat, |
| 198 | 198 | &tab_offset, &spec_vlc_tabs[i]); |
| 199 | − else | |
| 200 | − spec_vlc_tabs[i].table = 0; | |
| 199 | + else /* Reuse already initialized VLC table */ | |
| 200 | + spec_vlc_tabs[i] = spec_vlc_tabs[atrac3p_spectra_tabs[i].redirect]; | |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | /* build huffman tables for gain data decoding */ |
| @@ -880,10 +880,6 @@ static void decode_spectrum(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, · 676 unmodified lines | ||
| 880 | 880 | tab_index = (chan->table_type * 8 + codetab) * 7 + wordlen - 1; |
| 881 | 881 | tab = &atrac3p_spectra_tabs[tab_index]; |
| 882 | 882 | |
| 883 | − /* this allows reusing VLC tables */ | |
| 884 | − if (tab->redirect >= 0) | |
| 885 | − tab_index = tab->redirect; | |
| 886 | − | |
| 887 | 883 | decode_qu_spectra(gb, tab, &spec_vlc_tabs[tab_index], |
| 888 | 884 | &chan->spectrum[ff_atrac3p_qu_to_spec_pos[qu]], |
| 889 | 885 | num_specs); |